package i_oStream.byteStream;

import java.io.FileInputStream;
import java.io.FileOutputStream;
import java.io.IOException;

public class FileCopy {
    public static void main(String[] args) throws IOException {
        long start = System.currentTimeMillis();
        FileOutputStream fos1 = new FileOutputStream("D:\\xuruiqi.mp4");
        FileInputStream fis = new FileInputStream("D:\\下雨窗景.mp4");
        byte[] bytes = new byte[1024 * 1024 * 10];
        int number;
        while ((number = fis.read(bytes)) != -1) {
            fos1.write(bytes, 0, number);
        }
        fos1.close();
        fis.close();
        long end = System.currentTimeMillis();
        long result = (end - start);
        System.out.println(result);
    }
}
